package com.haoqizhe.kernel.mybatis.generator.utils;

/**
 * mybatis lombok pojo添加的注解类
 *
 * @author haoqizhe.li
 * @date 2018/1/20 23:23
 */
public enum AnnotationEnum {
    /**
     * 自定义注解
     **/
    RESPONSE_RESULT("@ResponseResult", "com.dgm.kernel.annotation.ResponseResult"),
    /**
     * lombok 注解
     **/
    DATA("@Data", "lombok.Data"),
    All_ARGS_CONSTRUCTOR("@AllArgsConstructor", "lombok.AllArgsConstructor"),
    NO_ARGS_CONSTRUCTOR("@NoArgsConstructor", "lombok.NoArgsConstructor"),
    SLF4J("@Slf4j", "lombok.extern.slf4j.Slf4j"),

    /**
     * spring 注解
     **/
    REPOSITORY("@Repository", "org.springframework.stereotype.Repository"),
    SERVICE("@Service", "org.springframework.stereotype.Service"),
    REST_CONTROLLER("@RestController", "org.springframework.web.bind.annotation.RestController"),
    REQUEST_MAPPING("@RequestMapping", "org.springframework.web.bind.annotation.RequestMapping"),
    GET_MAPPING("@GetMapping", "org.springframework.web.bind.annotation.GetMapping"),
    POST_MAPPING("@PostMapping", "org.springframework.web.bind.annotation.PostMapping"),
    PUT_MAPPING("@PutMapping", "org.springframework.web.bind.annotation.PutMapping"),
    DELETE_MAPPING("@DeleteMapping", "org.springframework.web.bind.annotation.DeleteMapping"),
    REQUEST_BODY("@RequestBody", "org.springframework.web.bind.annotation.RequestBody"),
    PATH_VARIABLE("@PathVariable", "org.springframework.web.bind.annotation.PathVariable"),

    AUTOWIRED("@Autowired", "org.springframework.beans.factory.annotation.Autowired"),
    OVERRIDE("@Override", "java.lang.Override"),

    /**
     * Swagger2 注解
     **/
    API_MODEL("@ApiModel", "io.swagger.annotations.ApiModel"),
    API_MODEL_PROPERTY("@ApiModelProperty", "io.swagger.annotations.ApiModelProperty"),
    API("@Api", "io.swagger.annotations.Api"),
    API_OPERATION("@ApiOperation", "io.swagger.annotations.ApiOperation"),
    API_RESPONSES("@ApiResponses", "io.swagger.annotations.ApiResponses"),
    API_RESPONSE("@ApiResponse", "io.swagger.annotations.ApiResponse"),
    API_IMPLICIT_PARAM("@ApiImplicitParam", "io.swagger.annotations.ApiImplicitParam"),

    /**
     * shiro 权限注解
     **/
    REQUIRES_PERMISSIONS("@RequiresPermissions", "org.apache.shiro.authz.annotation.RequiresPermissions"),
    /**
     * security 权限注解
     **/
    PRE_AUTHORIZE("@PreAuthorize", "org.springframework.security.access.prepost.PreAuthorize"),
    /**
     * hibernate validate 注解
     **/
    VALIDATED("@Validated", "org.springframework.validation.annotation.Validated"),

    AssertFalse("@AssertFalse", "javax.validation.constraints.AssertFalse"),
    AssertTrue("@AssertTrue", "javax.validation.constraints.AssertTrue"),
    DecimalMax("@DecimalMax", "javax.validation.constraints.DecimalMax"),
    DecimalMin("@DecimalMin", "javax.validation.constraints.DecimalMin"),
    Digits("@Digits", "javax.validation.constraints.Digits"),
    Future("@Future", "javax.validation.constraints.Future"),
    Max("@Max", "javax.validation.constraints.Max"),
    Min("@Min", "javax.validation.constraints.Min"),
    NotNull("@NotNull", "javax.validation.constraints.NotNull"),
    Null("@Null", "javax.validation.constraints.Null"),
    Past("@Past", "javax.validation.constraints.Past"),
    Pattern("@Pattern", "javax.validation.constraints.Pattern"),
    Size("@Size", "javax.validation.constraints.Size"),

    CreditCardNumber("@CreditCardNumber", "org.hibernate.validator.constraints.CreditCardNumber"),
    Email("@Email", "javax.validation.constraints.Email"),
    Length("@Length", "org.hibernate.validator.constraints.Length"),
    NotBlank("@NotBlank", "javax.validation.constraints.NotBlank"),
    NotEmpty("@NotEmpty", "org.hibernate.validator.constraints.NotEmpty"),
    Range("@Range", "org.hibernate.validator.constraints.Range"),
    SafeHtml("@SafeHtml", "org.hibernate.validator.constraints.SafeHtml"),
    ScriptAssert("@ScriptAssert", "org.hibernate.validator.constraints.ScriptAssert"),
    URL("@URL", "org.hibernate.validator.constraints.URL"),

    /**
     * mybatis plus注解
     **/
    TableName("@TableName ", "com.baomidou.mybatisplus.annotation.TableName"),
    TableId("@TableId ", "com.baomidou.mybatisplus.annotation.TableId");

    public final String annotation;
    public final String importedType;

    AnnotationEnum(String annotation, String importedType) {
        this.annotation = annotation;
        this.importedType = importedType;
    }
}
